package com.yqg.protection.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yqg.protection.cover.LocalDateTimeConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * agreement 实体类
 *
 * @author zxf
 * @since 2024-09-11
 */
@Getter
@Setter
@ApiModel(value = "Agreement对象", description = "")
public class Agreement implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelProperty(value = "ID", index = 0)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ExcelProperty(value = "协议名称", index = 1)
    @ApiModelProperty("协议名称")
    private String agreementName;

    @ExcelProperty(value = "协议内容", index = 2)
    @ApiModelProperty("协议内容")
    private String agreementContent;

    @ExcelProperty(value = "操作员id", index = 3)
    @ApiModelProperty("操作员id")
    private String operatorId;

    @ExcelProperty(value = "操作员", index = 4)
    @TableField(exist = false)
    @ApiModelProperty("操作员")
    private String operatorName;

    @ExcelProperty(value = "联系电话", index = 5)
    @ApiModelProperty("联系电话")
    private String telephone;

    @ExcelProperty(value = "邮箱", index = 6)
    @ApiModelProperty("邮箱")
    private String email;

    @ExcelProperty(value = "添加时间", index = 7, converter = LocalDateTimeConverter.class)
    @ApiModelProperty("添加时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ExcelIgnore
    private Integer isDelete;

}
